﻿
@{
    Yglab.Models.User user = Yglab.MyLib.MySingletonSession.Current.CurrentUser;
    string cntrlr = (ViewContext.RouteData.Values["controller"]).ToString();
}

<div class="navbar">
        <div class="navbar-inner">

            @Html.ActionLink("DEMİR YAYINCILIK", "Index", "Home", null, new { @class="brand"})

            @RenderPage("~/Views/Shared/_UserBox.cshtml")

            <ul class="nav">

                @if(user != null && user.isAdmin())
                {
                <li> @Html.ActionLink("Kullanıcı Yönet", "Index", "Kullanici") </li>
                <li> @Html.ActionLink("Kategoriler", "SubjectsAndSciences", "Admin") </li>
                <li> @Html.ActionLink("Dergiler", "Journals", "Admin") </li>
                }
                @if (user != null && cntrlr.Equals("Journal"))
                {
                    <li> @Html.RouteLink("Makale gönderr", "Journal", new { controller = "Journal", action = "NewVersionNewArticle", journalpath = ViewBag.journalpath }) </li>
                }
                @if (cntrlr.Equals("Journal"))
                {
                    <li> @Html.RouteLink("Makaleler", "Journal", new { controller = "Journal", action = "Articles", journalpath = ViewBag.journalpath }) </li>
                }

                
                
            </ul>

        </div>
    </div>
